<?php

if(isset($_POST['setor'])){

    session_start();
    include_once("../dao/FuncionarioDAO.php");

    $setor = new SetorDAO;

    $temp = $setor->buscaPorId($_POST['setor']);

    if($temp){
        $_SESSION['setor'] = $temp;
        $_SESSION['setor_nome'] = $temp->getNome();
        $_SESSION['tempo'] = time();
    }

}

header("location: ../");
exit;

?>
